add_executable(test2 test2.cpp)

target_link_libraries(test2 PUBLIC mylib)

add_test(
    NAME mytest2
    COMMAND test2
)